<?php

namespace App\Http\Controllers;

use App\Http\Models\ProductInfo;
use App\Jobs\SendReminderEmail;
use Encore\Admin\Form\Field\Date;
use Log;
use DB;

class RedisMailController extends Controller
{

    public function sendmail()
    {

//        Mail::send('emails.newEmails',
//            function ($message) {
//                $to = $this->email;
//                $message->to($to)->subject('【メールテスト】');
//            });

        $emailList = [
            "fangzhongyu@wisdom-japan.com",
            "fangzhongyu@wisdom-japan.com",
            "fangzhongyu@wisdom-japan.com",
            "fangzhongyu@wisdom-japan.com",
            "fangzhongyu@wisdom-japan.com",];
        foreach ($emailList as $email) {
//            Log::debug("test11111111111111111111".$email);
            SendReminderEmail::dispatch($email)->onQueue('sendmail');
        }

    }
}